package com.lpl.config;

import com.lpl.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class webconfig implements WebMvcConfigurer {
@Autowired
    private LoginInterceptor LoginInterceptor;
    @Override

    public void addInterceptors(InterceptorRegistry registry) {
//        接口拦截白名单
       registry.addInterceptor(LoginInterceptor).excludePathPatterns
                       ("/user/login","/lun/getlun","/user/loginhou")
               .excludePathPatterns("/Alissues/*")
               .excludePathPatterns("/Alissues/gettimu");

    }

}
